Fix light-client worker reuse and init failure#88
Open
Conversation
Two critical bugs in light-client verification flow: 1. Dead worker reuse: EVMLightClient.getDetails() terminated the worker on every exit but never nulled the reference, so !this.worker always returned false on re-entry. A second swap on the same destination chain would hang in light-client verification and fall back to degraded RPC path. 2. Init failure blocks action panel: On init failure, lightClientPending stayed true forever, returning empty action panel and leaving user unable to reveal secret or fall back to RPC verification. Fixes: Null worker reference after terminate in all paths (success, max-retries, error). Set destinationDetailsByLightClient with error on init failure so lightClientPending becomes false and UI unblocks. Reset light-client instance when hashlock changes to force fresh initialization. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fix two critical light-client verification bugs: dead worker reuse on successive swaps, and init failure blocking the action panel forever.
Bug 1: EVMLightClient.getDetails() terminated workers without nulling the reference, so re-entry checks always found a dead worker and skipped re-initialization. Subsequent swaps on the same destination chain would hang in light-client verification and fall back to degraded single-RPC polling.
Bug 2: Init failures (e.g., worker bootstrap timeout) never recorded an error state, leaving lightClientPending true forever. The action panel returned empty (line 105 in Actions/index.tsx), leaving users unable to reveal secrets or access RPC-based fallbacks.
Changes
🤖 Generated with Claude Code